/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package file;

import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenu;
import javax.swing.*;

/**
 *
 * @author sony
 */
public class futama extends JFrame {
    private ppswd ppswd;
    private JMenuBar menu;
    private JMenu file;
    private JMenuItem pasword, exit;
      public futama() {
        this.setTitle("pasword");
        this.setSize(500, 400);
        this.setLayout(new FlowLayout());
       menu = new JMenuBar();
       setJMenuBar(menu);
        file = new JMenu("file");
        menu.add(file);
        pasword = new JMenuItem("puasword");
        file.add(pasword);
        pasword.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                paswordAction();
            }
        });
        {
        }
        exit = new JMenuItem("exit");
        file.add(exit);
        exit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                exitCommand(e);
            }
            private void exitCommand(ActionEvent e) {
                System.exit(0);
            }
        });
    }
    public void paswordAction() {
        JDialog paswords = new JDialog(this);
        paswords.setSize(500, 400);
        paswords.setLocation(100, 80);
        paswords.setTitle("data anda");
        paswords.setLayout(null);
        ppswd panel = new ppswd();
        paswords.getContentPane().add(panel);
        paswords.setVisible(true);
    }
}
